package com.jiayan.controller;

import com.jiayan.model.EbProduct;
import com.jiayan.service.FurnitureService;
import com.jiayan.service.MaterialService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.Map;

@Controller
@RequestMapping("/material")
public class MaterialController {
    @Resource
    private MaterialService materialService;


//    @RequestMapping("/list")
//    public String Material(Model model,
//                            @RequestParam(value = "pnum",defaultValue = "1") Integer pnum){//行为
//        //TODO 1.调用service层查询首页数据的方法
//        Map<String, Object> list = materialService.list(pnum);
////        EbProduct detail = furnitureService.detail(1);
//        //TODO 2.绑定数据到model---数据
//        model.addAttribute("list",list);
////        model.addAttribute("detail",detail);
//
//        //TODO  3.返回View---html
//        return "material";
//    }
}
